package cn.edu.scau.cmi.wujiaxian.exercise4;

import java.util.Scanner;

public class Xiti4 {
	
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int degree = in.nextInt();
		double sum = 0;
		if (degree <= 0) {
			System.out.println("degree can not be less than 0");
		} else if (degree >= 1 && degree <= 90) {
			sum += degree * 0.6;
		} else if (degree >= 91 && degree <= 150) {
			sum += 54 + (degree - 90) * 1.1;
		} else {
			sum += 120 + (degree - 150) * 1.7;
		}
		System.out.println(sum);
		in.close();
	}
	
}
